package com.unicom.priceboard.data.vo;

import com.unicom.priceboard.util.NumberUtil;

public class StockTrackHCM {
	private String tradingDate;
	private String symbol_code;
	private int centerId;
	private double priorClosePrice;
	private double ceiling;
	private double floor;
	private double priceOne;
	private int volOne;
	private double priceTwo;
	private int volTwo;
	private double price;
	private int vol;
	private double highest_price;
	private double lowest_price;
	private double pct_change;
	private String best1Bid;
	private String best2Bid;
	private String best3Bid;
	private String best1BidVolume;
	private String best2BidVolume;
	private String best3BidVolume;
	private String best1Offer;
	private String best2Offer;
	private String best3Offer;
	private String best1OfferVolume;
	private String best2OfferVolume;
	private String best3OfferVolume;
	
	public StockTrackHCM(HoStock stock) {
		String pctVal = NumberUtil.formatNumber(stock.getPct_change());
		this.tradingDate = stock.getTradingDate();
		this.symbol_code = stock.getSymbol_code();
		this.centerId = 1;
		this.priorClosePrice = Double.parseDouble(stock.getPriorClosePrice());
		this.ceiling = Double.parseDouble(stock.getCeiling());
		this.floor = Double.parseDouble(stock.getFloor());
		this.priceOne = Double.parseDouble(stock.getPriceOne());
		this.volOne = Integer.parseInt(stock.getVolOne().replaceAll(",", ""));
		this.priceTwo = Double.parseDouble(stock.getPriceTwo());
		this.volTwo = Integer.parseInt(stock.getVolTwo().replaceAll(",", ""));
		this.price = Double.parseDouble(stock.getPrice());
		this.vol = Integer.parseInt(stock.getVol().replaceAll(",", ""));
		this.highest_price = Double.parseDouble(stock.getHighest_price());
		this.lowest_price = Double.parseDouble(stock.getLowest_price());
		
		if(this.priorClosePrice!=0) {
			pctVal = pctVal.equals("")?"0.0":pctVal;
			this.pct_change = Double.parseDouble(pctVal);
		}else
			this.pct_change = 0;
		
		this.best1Bid = stock.getBest1Bid();
		this.best2Bid = stock.getBest2Bid();
		this.best3Bid = stock.getBest3Bid();
		this.best1BidVolume = stock.getBest1BidVolume();
		this.best2BidVolume = stock.getBest2BidVolume();
		this.best3BidVolume = stock.getBest3BidVolume();
		this.best1Offer = stock.getBest1Offer();
		this.best2Offer = stock.getBest2Offer();
		this.best3Offer = stock.getBest3Offer();
		this.best1OfferVolume = stock.getBest1OfferVolume();
		this.best2OfferVolume = stock.getBest2OfferVolume();
		this.best3OfferVolume = stock.getBest3OfferVolume();
		
	}
	
	/**
	 * @return the tradingDate
	 */
	public String getTradingDate() {
		return tradingDate;
	}
	/**
	 * @return the symbol_code
	 */
	public String getSymbol_code() {
		return symbol_code;
	}
	/**
	 * @return the centerId
	 */
	public int getCenterId() {
		return centerId;
	}
	/**
	 * @return the priorClosePrice
	 */
	public double getPriorClosePrice() {
		return priorClosePrice;
	}
	/**
	 * @return the ceiling
	 */
	public double getCeiling() {
		return ceiling;
	}
	/**
	 * @return the floor
	 */
	public double getFloor() {
		return floor;
	}
	/**
	 * @return the priceOne
	 */
	public double getPriceOne() {
		return priceOne;
	}
	/**
	 * @return the volOne
	 */
	public int getVolOne() {
		return volOne;
	}
	/**
	 * @return the priceTwo
	 */
	public double getPriceTwo() {
		return priceTwo;
	}
	/**
	 * @return the volTwo
	 */
	public int getVolTwo() {
		return volTwo;
	}
	/**
	 * @return the price
	 */
	public double getPrice() {
		return price;
	}
	/**
	 * @return the vol
	 */
	public int getVol() {
		return vol;
	}
	/**
	 * @return the highest_price
	 */
	public double getHighest_price() {
		return highest_price;
	}
	/**
	 * @return the lowest_price
	 */
	public double getLowest_price() {
		return lowest_price;
	}
	/**
	 * @return the pct_change
	 */
	public double getPct_change() {
		return pct_change;
	}
	/**
	 * @return the best1Bid
	 */
	public String getBest1Bid() {
		return best1Bid;
	}
	/**
	 * @return the best2Bid
	 */
	public String getBest2Bid() {
		return best2Bid;
	}
	/**
	 * @return the best3Bid
	 */
	public String getBest3Bid() {
		return best3Bid;
	}
	/**
	 * @return the best1BidVolume
	 */
	public String getBest1BidVolume() {
		return best1BidVolume;
	}
	/**
	 * @return the best2BidVolume
	 */
	public String getBest2BidVolume() {
		return best2BidVolume;
	}
	/**
	 * @return the best3BidVolume
	 */
	public String getBest3BidVolume() {
		return best3BidVolume;
	}
	/**
	 * @return the best1Offer
	 */
	public String getBest1Offer() {
		return best1Offer;
	}
	/**
	 * @return the best2Offer
	 */
	public String getBest2Offer() {
		return best2Offer;
	}
	/**
	 * @return the best3Offer
	 */
	public String getBest3Offer() {
		return best3Offer;
	}
	/**
	 * @return the best1OfferVolume
	 */
	public String getBest1OfferVolume() {
		return best1OfferVolume;
	}
	/**
	 * @return the best2OfferVolume
	 */
	public String getBest2OfferVolume() {
		return best2OfferVolume;
	}
	/**
	 * @return the best3OfferVolume
	 */
	public String getBest3OfferVolume() {
		return best3OfferVolume;
	}
	
	/**
	 * @param tradingDate the tradingDate to set
	 */
	public void setTradingDate(String tradingDate) {
		this.tradingDate = tradingDate;
	}
	/**
	 * @param symbol_code the symbol_code to set
	 */
	public void setSymbol_code(String symbol_code) {
		this.symbol_code = symbol_code;
	}
	/**
	 * @param centerId the centerId to set
	 */
	public void setCenterId(int centerId) {
		this.centerId = centerId;
	}
	/**
	 * @param priorClosePrice the priorClosePrice to set
	 */
	public void setPriorClosePrice(double priorClosePrice) {
		this.priorClosePrice = priorClosePrice;
	}
	/**
	 * @param ceiling the ceiling to set
	 */
	public void setCeiling(double ceiling) {
		this.ceiling = ceiling;
	}
	/**
	 * @param floor the floor to set
	 */
	public void setFloor(double floor) {
		this.floor = floor;
	}
	/**
	 * @param priceOne the priceOne to set
	 */
	public void setPriceOne(double priceOne) {
		this.priceOne = priceOne;
	}
	/**
	 * @param volOne the volOne to set
	 */
	public void setVolOne(int volOne) {
		this.volOne = volOne;
	}
	/**
	 * @param priceTwo the priceTwo to set
	 */
	public void setPriceTwo(double priceTwo) {
		this.priceTwo = priceTwo;
	}
	/**
	 * @param volTwo the volTwo to set
	 */
	public void setVolTwo(int volTwo) {
		this.volTwo = volTwo;
	}
	/**
	 * @param price the price to set
	 */
	public void setPrice(double price) {
		this.price = price;
	}
	/**
	 * @param vol the vol to set
	 */
	public void setVol(int vol) {
		this.vol = vol;
	}
	/**
	 * @param highest_price the highest_price to set
	 */
	public void setHighest_price(double highest_price) {
		this.highest_price = highest_price;
	}
	/**
	 * @param lowest_price the lowest_price to set
	 */
	public void setLowest_price(double lowest_price) {
		this.lowest_price = lowest_price;
	}
	/**
	 * @param pct_change the pct_change to set
	 */
	public void setPct_change(double pct_change) {
		this.pct_change = pct_change;
	}
	/**
	 * @param best1Bid the best1Bid to set
	 */
	public void setBest1Bid(String best1Bid) {
		this.best1Bid = best1Bid;
	}
	/**
	 * @param best2Bid the best2Bid to set
	 */
	public void setBest2Bid(String best2Bid) {
		this.best2Bid = best2Bid;
	}
	/**
	 * @param best3Bid the best3Bid to set
	 */
	public void setBest3Bid(String best3Bid) {
		this.best3Bid = best3Bid;
	}
	/**
	 * @param best1BidVolume the best1BidVolume to set
	 */
	public void setBest1BidVolume(String best1BidVolume) {
		this.best1BidVolume = best1BidVolume;
	}
	/**
	 * @param best2BidVolume the best2BidVolume to set
	 */
	public void setBest2BidVolume(String best2BidVolume) {
		this.best2BidVolume = best2BidVolume;
	}
	/**
	 * @param best3BidVolume the best3BidVolume to set
	 */
	public void setBest3BidVolume(String best3BidVolume) {
		this.best3BidVolume = best3BidVolume;
	}
	/**
	 * @param best1Offer the best1Offer to set
	 */
	public void setBest1Offer(String best1Offer) {
		this.best1Offer = best1Offer;
	}
	/**
	 * @param best2Offer the best2Offer to set
	 */
	public void setBest2Offer(String best2Offer) {
		this.best2Offer = best2Offer;
	}
	/**
	 * @param best3Offer the best3Offer to set
	 */
	public void setBest3Offer(String best3Offer) {
		this.best3Offer = best3Offer;
	}
	/**
	 * @param best1OfferVolume the best1OfferVolume to set
	 */
	public void setBest1OfferVolume(String best1OfferVolume) {
		this.best1OfferVolume = best1OfferVolume;
	}
	/**
	 * @param best2OfferVolume the best2OfferVolume to set
	 */
	public void setBest2OfferVolume(String best2OfferVolume) {
		this.best2OfferVolume = best2OfferVolume;
	}
	/**
	 * @param best3OfferVolume the best3OfferVolume to set
	 */
	public void setBest3OfferVolume(String best3OfferVolume) {
		this.best3OfferVolume = best3OfferVolume;
	}
	
}
